<template>
	<view>
		<custom-nav-sq-xcx :isBack="true" :hasFixedFlag="true" bgColor="usuallyBgQy" :needConBlock="true">
			<block slot="content">企业新闻</block>
		</custom-nav-sq-xcx>
		<view class="sqConBlock qyBlock"></view>
		<view class="sqConWrap whiteBg noPadd">
			<!-- <z-paging-swiper>
				<template #top>
					<z-tabs inactiveColor="#999" active-color="#3a75fb" ref="tabs" :list="tabList" :current="current" @change="tabsChange" />
				</template>
			</z-paging-swiper> -->
			
			<!-- <qy-news-list></qy-news-list> -->
		</view>
	</view>
</template>

<script>
	import QyNewsList from './components/QyNewsList.vue'
	export default {
		components:{
			QyNewsList
		},
		data(){
			return{
				tabList:[
					{name:'新闻',id:1},
					{name:'公告',id:2}
				],
				current:0,
				tabNavTop:20,
			}
		},
		onLoad(options){
			this.groupId = options.groupId;
			// #ifdef APP-PLUS || MP-WEIXIN
				this.tabNavTop = this.navHeight + 20;
		   // #endif
			this.getList();
		},
		methods:{
			//tabs通知swiper切换
			tabsChange(index) {
				this.current = index;
				this.typeId = this.tabList[index].id;
			},
			//swiper滑动中
			swiperTransition(e) {
				this.$refs.tabs.setDx(e.detail.dx);
			},
			//swiper滑动结束
			swiperAnimationfinish(e) {
				this.current = e.detail.current;
				this.typeId = this.tabList[this.current].id;
				this.$refs.tabs.unlockDx();
			},
		}
	}
</script>

<style lang="scss" scoped>
	::v-deep .zp-swiper-container-fixed{
		top: 60px;
	}
</style>